package com.ss.android.article.base.feature.detail2.widget.a;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.bytedance.common.utility.UIUtils;
import com.ss.android.article.base.app.AppData;
import com.ss.android.article.browser.R;

public final class DetailAdTextLinkLayout extends LinearLayout {
    private TextView adTextLinkTitleTv;

    public DetailAdTextLinkLayout(Context arg3) {
        super(arg3);
        inflate(this.getContext(), R.layout.new_ad_textlink_layout, ((ViewGroup)this));
        this.adTextLinkTitleTv = this.findViewById(com.ss.android.article.browser.R.id.ad_textlink_title);
        int v0 = ((int) UIUtils.dp2px(this.getContext(), 5f));
        this.setPadding(v0, v0, v0, v0);
        AppData.getInstance();
        AppData.isNightMode();
        this.setBackgroundResource(com.ss.android.article.browser.R.drawable.bg_detail_action);
        this.setGravity(16);
        this.setOrientation(HORIZONTAL);
    }

    public final void adaptNightMode() {
        this.setBackgroundResource(com.ss.android.article.browser.R.drawable.bg_detail_action);
        this.adTextLinkTitleTv.setTextColor(this.getResources().getColorStateList(com.ss.android.article.browser.R.color.detail_ad_textlink_title));
    }

    public final void setTitleOnClickListener(View.OnClickListener onClickListener) {
        this.adTextLinkTitleTv.setOnClickListener(onClickListener);
    }

    public final void setTitleText(String arg2) {
        this.adTextLinkTitleTv.setText(arg2);
    }
}

